# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-system-monitor
pkgver=3.24.0+4+g9140c85a
pkgrel=1
pkgdesc="View current processes and monitor system state"
url="https://wiki.gnome.org/Apps/SystemMonitor"
arch=(i686 x86_64)
license=(GPL)
depends=(libgtop gtkmm3 librsvg systemd)
makedepends=(itstool docbook-xsl intltool desktop-file-utils appdata-tools gnome-common git)
options=(!emptydirs)
groups=(gnome)
_commit=9140c85af3964cf1529d39ffa45dc4e6ec0cfc5e  # gnome-3-24
source=("git+https://git.gnome.org/browse/gnome-system-monitor#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --libexecdir=/usr/lib/$pkgname --enable-systemd --enable-wnck
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
